package com.zeldu.exam.service.serviceimpl;

import com.zeldu.exam.mapper.ExamQuestionDao;
import com.zeldu.exam.mapper.questionLibraryDao;
import com.zeldu.exam.pojo.exam_question;
import com.zeldu.exam.pojo.questionLibrary;
import com.zeldu.exam.service.CreatePaperAutoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CreatePaperAutoServiceImpl implements CreatePaperAutoService {
    @Autowired
    private ExamQuestionDao examQuestionDao;
    @Autowired
    private questionLibraryDao questionLibraryDao;
    @Override
    public List<questionLibrary> findQuestionBySubject(String subject) {
        return questionLibraryDao.findQuestionBySubject(subject);
    }

    @Override
    public int insertPaper(exam_question exam_question) {
        return examQuestionDao.insert(exam_question);
    }
}
